﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
using System.ComponentModel;

namespace TA.Turbo.Controls
{
	/// <summary>
	/// BaseControl which has client-side behavior.
	/// </summary>
	public interface IComplexControl
	{
		/// <summary>
		/// When implemented, gets the name of the client-side class which describes this object.
		/// </summary>
		string ClientClassName { get; }
		/// <summary>
		/// When implemented, renders the initialization script for this complex control.
		/// </summary>
		/// <param name="writer"></param>
		void RenderInitScript(HtmlTextWriter writer);
		/// <summary>
		/// When implemented, renders the script for this complex control which is executed after the constructor and before the Init method.
		/// </summary>
		/// <param name="writer"></param>
		/// <param name="varName"></param>
		void RenderInitScriptInternal(HtmlTextWriter writer, string varName);
		/// <summary>
		/// When implemented, renders the script for this complex control which is executed after all other initialization is done.
		/// </summary>
		/// <param name="writer"></param>
		/// <param name="varName"></param>
		void RenderLoadScriptInternal(HtmlTextWriter writer, string varName);
		/// <summary>
		/// Raised upon initialization on the client.
		/// </summary>
		[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
		ClientEvent InitControl { get; }

	}
}
